package com.ys.web.pay.mapper;

import com.ys.base.BaseDao;
import com.ys.web.pay.model.BusiTransferRecordCash;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface TransferMapper extends BaseDao {

    void saveBusiTransferRecord(BusiTransferRecordCash busiTransferRecordCash);

    int updateBusiTransferRecordCash(BusiTransferRecordCash recordCash);

    @Select("select * from busi_transfer_record_cash where id=#{id}")
    BusiTransferRecordCash getBusiTransferRecordCashById(Long id);

    @Select("select * from busi_transfer_record_cash where status = #{EQ_status} and raw_add_time < #{addTime}")
    List<BusiTransferRecordCash> getBusiTransferRecordCashList(Map<String, Object> map);

    @Select("SELECT COUNT(0) FROM `busi_transfer_record_cash` WHERE STATUS = 1 AND user_id = #{uid} AND payChannel=2")
    int transNum(long uid);
}
